﻿using FrameWork.Data.Enum;
using FrameWork.Data.DbData;
using FrameWork.Data.Mapping;
using FrameWork.Data.Interface;
using System.Collections.Generic;

namespace FrameWork.Data.Impl
{
    public class DeviceTypeManager : BaseRepository<DeviceType>, IDeviceTypeManager
    {
        public DeviceTypeManager(IDbContext dbContext) : base(dbContext)
        {
        }
        /// <summary>
        /// 查询主设备
        /// </summary>
        /// <returns></returns>
        public List<DeviceType> QueryMainType()
        {
            return context.db.Queryable<DeviceType>()
                .Where(p => p.ProductLine == (int)EnumProductLine.Main)
                .ToList();
        }
    }
}